/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gestionnaires;

import javax.ejb.Stateless;
import javax.ejb.LocalBean;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import utilisateurs.modeles.Image;



/**
 *
 * @author nahla
 */
@Stateless
@LocalBean
public class GestionnaireImage extends AbstractFacade<Image>{

     @PersistenceContext(unitName = "BlueRayPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public GestionnaireImage() {
        super(Image.class);
    }

    public Image create(String url, int width, int height) {
        Image image = new Image(url, width, height);
        create(image);
        return image;
    }
}
